package Main;
import java.util.Scanner;
public class Main3 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String A;
		while(sc.hasNext()){
		A=sc.nextLine();
		char[] B=A.toCharArray();
		int S=0;
		for(int i=0;i<B.length;i++){
			char a=B[i];
			if(a>='0'&&a<='9')
			S=S+B[i]-48;
		}
		System.out.println(S);
	}
		}
}
